<!DOCTYPE html>
<html>
<head>

	<title>{$keyword}┊{$site_name}</title>
    <meta http-equiv="Content-Language" content="en-US">
    <meta name="author" content="Powerless"> 
	<meta name="keywords" content="search" />
	<meta name="description" content="{$seo_description}">
    <tc_include file="Public:head" />
    <style type="text/css">
	.form{
		margin-top: -50px;
		margin-left: -22.5%;;
		padding-left: 50%;
		}
	.searchInput{
		width: 45%;
		}
	.searchbar{
		height: 36px;
		width: 100px;
		margin-bottom: 10px;
		}
	.pg-opt .col div ol{
		margin:10px 0 0 0;
		width: 270px;
		height: 20px;
		overflow: hidden;
		text-align: right;
		}
		
	.pg-opt .col div ol a{
		color: #59b2e5;
		}
	</style>
</head>
<body>
<tc_include file="Public:nav" />
<div class="container tc-main">
	
	
    <div class="pg-opt pin">
        <div class="col">
                    <div style=" float:right;">
                        <ol>
                            <a href="__ROOT__/">Главная</a>┊
                            <a>{$keyword}</a>
                        </ol>
                     </div>
                        <h2>искать</h2>
                        
                </div>
            <form class="form" role="form" method="post" action="{:u('/Search')}">           
            	<input type="text" class="searchInput" required="required" name="keyword" value="{$keyword}"/>
                <input type="submit" class="searchbar" value=" искать " />
            </form>
    </div>
    <div class="row">
		<div class="span9">
			<div class="">
				<php>
					$lists = sp_sql_posts_paged_bykeyword($keyword);
				</php>
				<volist name="lists['posts']" id="vo">
				
				<div class="list-boxes">
					<h2><a href="{:leuu('article/index',array('id'=>$vo['tid']))}">{$vo.post_title}</a></h2>
					<p>{$vo.post_excerpt}</p>
					<div>
						<div class="pull-left">
							<div class="list-actions">
							<a href="javascript:;"><i class="fa fa-eye"></i><span>{$vo.post_hits}</span></a>
							<a href="{:U('article/do_like',array('id'=>$vo['object_id']))}" class="J_count_btn"><i class="fa fa-thumbs-up"></i><span class="count">{$vo.post_like}</span></a>
							<a href="{:U('user/favorite/do_favorite',array('id'=>$vo['object_id']))}" class="J_favorite_btn" data-title="{$vo.post_title}" data-url="{:U('portal/article/index',array('id'=>$vo['tid']))}" data-key="{:sp_get_favorite_key('posts',$vo['object_id'])}">
								<i class="fa fa-star-o"></i>
							</a>
							</div>
						</div>
						<a class="btn btn-warning pull-right" href="{:leuu('article/index',array('id'=>$vo['tid']))}">See more</a>
					</div>
				</div>
				</volist>
				
			</div>
			<div class="pagination">
				<ul>
					{$lists['page']}
				</ul>
			</div>
		</div>
		<div class="span3">
			<div class="tc-box first-box">
			<div class="headtitle">
          		<h2>Поделиться</h2>
          	</div>
<script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-54acf10b5c282aae" async="async"></script>
<style type="text/css">
.at-share-tbx-element .at-share-btn {
margin: 0 3px 0 0;
}
</style>
<div class="addthis_sharing_toolbox"></div>
        	</div>
        	
        	<div class="tc-box">
	        	<div class="headtitle">
	        		<h2>Популярные статьи</h2>
	        	</div>
	        	<div class="ranking">
	        		<php>
						$hot_articles=sp_sql_posts("field:post_title,post_excerpt,tid,smeta;order:post_hits desc;limit:9;"); 
					</php>
		        	<ul class="unstyled">
		        		<foreach name="hot_articles" item="vo">
		        			<php>$top=$key<3?"top3":"";</php>
							<li class="{$top}"><i>{$key+1}</i><a title="{$vo.post_title}" href="{:leuu('article/index',array('id'=>$vo['tid']))}">{$vo.post_title}</a></li>
						</foreach>
					</ul>
				</div>
			</div>
			<div class="tc-box">
	        	<div class="headtitle">
	        		<h2>Последние каменты</h2>
	        	</div>
	        	<div class="comment-ranking">
	        		<php>$last_comments=sp_get_comments("field:*;limit:0,5;order:createtime desc;");</php>
	        		<foreach name="last_comments" item="vo">
	                    <div class="comment-ranking-inner">
	                        <i class="fa fa-comment"></i>
	                        <a href="{:U('user/index/index',array('id'=>$vo['uid']))}">{$vo.full_name}:</a>
	                        <span>{$vo.content}</span>
	                        <a href="__ROOT__/{$vo.url}#comment{$vo.id}">View original</a>
	                        <span class="comment-time">{:date('d - m  H:i',strtotime($vo['createtime']))}</span>
	                    </div>
                    </foreach>
                </div>
			</div>
			<div class="tc-box">
	        	<div class="posts">
	        		<a href="http://info.flagcounter.com/s31P" target="_blank">
                    <img src="http://s11.flagcounter.com/count/s31P/bg_FFFFFF/txt_428BCA/border_FFFFFF/columns_3/maxflags_15/viewers_3/labels_1/pageviews_1/flags_2/" alt="Flag Counter" border="0">
                    </a>
		        </div>
			</div>
		</div>
    </div>
    
    
    <tc_include file="Public:footer" />
</div>

    
<!-- JavaScript -->
<tc_include file="Public:scripts" />

</body>
</html>